package com.example.feign.service;

import com.example.feign.service.impl.SchedualServiceHistric;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.concurrent.ScheduledExecutorService;

@Repository
//断路器 SchedualServiceHistric为FeginService实现类
//value = "EurekaClient" 这个EurekaClient eurekaclient和eurekaclient2中的spring.application.name值
@FeignClient(value = "EurekaClient",fallback = SchedualServiceHistric.class)
public interface FeginService {
    @RequestMapping("/hellow")
    public String hellow(@RequestParam("name") String name);
}
